//
//  WeViewController.swift
//  BJ Racing -Guild wars velocity
//
//  Created by inphase on 17/9/22.
//  Copyright © 2017年 inphase. All rights reserved.
//

import UIKit

import SVProgressHUD
class WeViewController: UIViewController,UIWebViewDelegate {

   var UrlStr : String?
   var webView : UIWebView?
    
    override func viewDidLoad() {
        super.viewDidLoad()

        self.refreshAction()
    
    }


    func webViewDidStartLoad(_ webView: UIWebView) {
        
        SVProgressHUD.show()
        
    }
    
    
    func webViewDidFinishLoad(_ webView: UIWebView) {
        
        SVProgressHUD.dismiss()
        
    }
    
     // MARK:请求页面加载
    func refreshAction() {
      
        self.webView = UIWebView.init(frame: self.view.bounds)
        
        self.webView?.backgroundColor = UIColor.black
        self.webView?.delegate = self
        
        self.view.addSubview(self.webView!)
        let request = NSURLRequest.init(url: NSURL.init(string: self.UrlStr!) as! URL)
      self.webView?.loadRequest(request as URLRequest)
    
    }
    

}
